<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>libdiscid: discid.h File Reference</title>
<link href="discid_8h_files/doxygen.css" rel="stylesheet" type="text/css">
<link href="discid_8h_files/tabs.css" rel="stylesheet" type="text/css">
<script id="objHTMLFormElementPrototype">try{   document.objHTMLFormElementPrototype = new Object();   document.objHTMLFormElementPrototype.submit = HTMLFormElement.prototype.submit;   HTMLFormElement.prototype.submit = function(AEvent)   {      var kpmEvent = document.createEvent('Event');      kpmEvent.initEvent('kpm_submit', true, true);      this.dispatchEvent(kpmEvent);      document.objHTMLFormElementPrototype.submit.apply(this);   };}catch(e){  alert('Error during attach to HTMLFormElement.prototype.submit: ' + ErrorMessage);}</script></head><body kpmisdocumentcomplete="666">
<!-- Generated by Doxygen 1.4.6-NO -->
<div class="tabs">
  <ul>
    <li><a href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/index.html"><span>Main&nbsp;Page</span></a></li>
    <li id="current"><a href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/globals.html"><span>File&nbsp;Members</span></a></li>
  </ul></div>
<h1>discid.h File Reference</h1>
<p>
<a href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">typedef void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A transparent handle for an Audio CD.  <a href="#18a0b8162c3f4f84e6d3bfd56dbd03cd"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle for a new DiscId object.  <a href="#5e6d75fd6ffea8b36d599c6641d9ee02"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#00e0a2469329975f23032ae2d3cdbb6d">discid_free</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the memory allocated for the DiscId object.  <a href="#00e0a2469329975f23032ae2d3cdbb6d"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#f8be042282a7bc69e29a31cd1a4b41bf">discid_read</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d, const char *device)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the disc in the given CD-ROM/DVD-ROM drive.  <a href="#f8be042282a7bc69e29a31cd1a4b41bf"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#66b979ebdc3069c773f1a436fe784cd5">discid_put</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d, int first, int last, int *offsets)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Provides the TOC of a known CD.  <a href="#66b979ebdc3069c773f1a436fe784cd5"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#ec0ff1282244491f914a81b9760ff49e">discid_get_error_msg</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a human-readable error message.  <a href="#ec0ff1282244491f914a81b9760ff49e"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#32755873dfdcb0854b04cc675c4ccdaf">discid_get_id</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a MusicBrainz DiscID.  <a href="#32755873dfdcb0854b04cc675c4ccdaf"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#123daf19fa281b60c9fa59910e547f64">discid_get_freedb_id</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a FreeDB DiscID.  <a href="#123daf19fa281b60c9fa59910e547f64"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#f299b1b6ae1aadde5532fac873586d7a">discid_get_submission_url</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an URL for submitting the DiscID to MusicBrainz.  <a href="#f299b1b6ae1aadde5532fac873586d7a"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#39808bea146a7d21db6d9a0df6890d6e">discid_get_default_device</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of the default disc drive for this operating system.  <a href="#39808bea146a7d21db6d9a0df6890d6e"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#654db04d5b126d56df03d93185270969">discid_get_first_track_num</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of the first track on this disc.  <a href="#654db04d5b126d56df03d93185270969"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#b1a643470a59de0530dea65500194fe7">discid_get_last_track_num</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of the last track on this disc.  <a href="#b1a643470a59de0530dea65500194fe7"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#ca047d24b864f1fe35b1d682a1dd924d">discid_get_sectors</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the length of the disc in sectors.  <a href="#ca047d24b864f1fe35b1d682a1dd924d"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#9810b56d016c1cd90b219b4fb4db285f">discid_get_track_offset</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d, int track_num)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the sector offset of a track.  <a href="#9810b56d016c1cd90b219b4fb4db285f"></a><br></td></tr>
<tr><td class="memItemLeft" align="right" nowrap="nowrap" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#00beb117b2340a1db2d6dd79d8fc46f3">discid_get_track_length</a> (<a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *d, int track_num)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the length of a track in sectors.  <a href="#00beb117b2340a1db2d6dd79d8fc46f3"></a><br></td></tr>
</tbody></table>
</p><hr><h2>Typedef Documentation</h2>
<a class="anchor" name="18a0b8162c3f4f84e6d3bfd56dbd03cd"></a><!-- doxytag: member="discid.h::DiscId" ref="18a0b8162c3f4f84e6d3bfd56dbd03cd" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">typedef void* <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a>          </td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
A transparent handle for an Audio CD. 
</p><p>
This is returned by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> and has to be passed as the first parameter to all discid_*() functions.     </p></td>
  </tr>
</tbody></table>
</p><hr><h2>Function Documentation</h2>
<a class="anchor" name="00e0a2469329975f23032ae2d3cdbb6d"></a><!-- doxytag: member="discid.h::discid_free" ref="00e0a2469329975f23032ae2d3cdbb6d" args="(DiscId *d)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">void discid_free           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top"> <em>d</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Release the memory allocated for the DiscId object. 
</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
  </tbody></table>
</dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="39808bea146a7d21db6d9a0df6890d6e"></a><!-- doxytag: member="discid.h::discid_get_default_device" ref="39808bea146a7d21db6d9a0df6890d6e" args="(void)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">char* discid_get_default_device           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top">void&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top">          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the name of the default disc drive for this operating system. 
</p><p>
</p><dl compact="compact"><dt><b>Returns:</b></dt><dd>a string containing an operating system dependent device identifier </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="ec0ff1282244491f914a81b9760ff49e"></a><!-- doxytag: member="discid.h::discid_get_error_msg" ref="ec0ff1282244491f914a81b9760ff49e" args="(DiscId *d)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">char* discid_get_error_msg           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top"> <em>d</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return a human-readable error message. 
</p><p>
This function may only be used if <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#f8be042282a7bc69e29a31cd1a4b41bf">discid_read()</a> failed. The returned error message is only valid as long as the DiscId object exists.</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>a string describing the error that occurred </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="654db04d5b126d56df03d93185270969"></a><!-- doxytag: member="discid.h::discid_get_first_track_num" ref="654db04d5b126d56df03d93185270969" args="(DiscId *d)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">int discid_get_first_track_num           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top"> <em>d</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the number of the first track on this disc. 
</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>the number of the first track </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="123daf19fa281b60c9fa59910e547f64"></a><!-- doxytag: member="discid.h::discid_get_freedb_id" ref="123daf19fa281b60c9fa59910e547f64" args="(DiscId *d)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">char* discid_get_freedb_id           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top"> <em>d</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return a FreeDB DiscID. 
</p><p>
The returned string is only valid as long as the DiscId object exists.</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>a string containing a FreeDB DiscID </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="32755873dfdcb0854b04cc675c4ccdaf"></a><!-- doxytag: member="discid.h::discid_get_id" ref="32755873dfdcb0854b04cc675c4ccdaf" args="(DiscId *d)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">char* discid_get_id           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top"> <em>d</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return a MusicBrainz DiscID. 
</p><p>
The returned string is only valid as long as the DiscId object exists.</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>a string containing a MusicBrainz DiscID </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="b1a643470a59de0530dea65500194fe7"></a><!-- doxytag: member="discid.h::discid_get_last_track_num" ref="b1a643470a59de0530dea65500194fe7" args="(DiscId *d)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">int discid_get_last_track_num           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top"> <em>d</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the number of the last track on this disc. 
</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>the number of the last track </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="ca047d24b864f1fe35b1d682a1dd924d"></a><!-- doxytag: member="discid.h::discid_get_sectors" ref="ca047d24b864f1fe35b1d682a1dd924d" args="(DiscId *d)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">int discid_get_sectors           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top"> <em>d</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the length of the disc in sectors. 
</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>the length of the disc in sectors </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="f299b1b6ae1aadde5532fac873586d7a"></a><!-- doxytag: member="discid.h::discid_get_submission_url" ref="f299b1b6ae1aadde5532fac873586d7a" args="(DiscId *d)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">char* discid_get_submission_url           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top"> <em>d</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return an URL for submitting the DiscID to MusicBrainz. 
</p><p>
The URL leads to an interactive disc submission wizard that guides the 
user through the process of associating this disc's DiscID with a 
release in the MusicBrainz database.</p><p>
The returned string is only valid as long as the DiscId object exists.</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>a string containing an URL </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="00beb117b2340a1db2d6dd79d8fc46f3"></a><!-- doxytag: member="discid.h::discid_get_track_length" ref="00beb117b2340a1db2d6dd79d8fc46f3" args="(DiscId *d, int track_num)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">int discid_get_track_length           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>d</em>, </td>
        </tr>
        <tr>
          <td class="md" align="right" nowrap="nowrap"></td>
          <td class="md"></td>
          <td class="md" nowrap="nowrap">int&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>track_num</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the length of a track in sectors. 
</p><p>
Only track numbers between (and including) <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#654db04d5b126d56df03d93185270969">discid_get_first_track_num()</a> and <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#b1a643470a59de0530dea65500194fe7">discid_get_last_track_num()</a> may be used.</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>track_num</em>&nbsp;</td><td>the number of a track </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>length of the specified track </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="9810b56d016c1cd90b219b4fb4db285f"></a><!-- doxytag: member="discid.h::discid_get_track_offset" ref="9810b56d016c1cd90b219b4fb4db285f" args="(DiscId *d, int track_num)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">int discid_get_track_offset           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>d</em>, </td>
        </tr>
        <tr>
          <td class="md" align="right" nowrap="nowrap"></td>
          <td class="md"></td>
          <td class="md" nowrap="nowrap">int&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>track_num</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the sector offset of a track. 
</p><p>
Only track numbers between (and including) <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#654db04d5b126d56df03d93185270969">discid_get_first_track_num()</a> and <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#b1a643470a59de0530dea65500194fe7">discid_get_last_track_num()</a> may be used.</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>track_num</em>&nbsp;</td><td>the number of a track </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>sector offset of the specified track </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="5e6d75fd6ffea8b36d599c6641d9ee02"></a><!-- doxytag: member="discid.h::discid_new" ref="5e6d75fd6ffea8b36d599c6641d9ee02" args="()" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a>* discid_new           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" nowrap="nowrap" valign="top">          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap="nowrap"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return a handle for a new DiscId object. 
</p><p>
If no memory could be allocated, NULL is returned. Don't use the created DiscId object before calling <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#f8be042282a7bc69e29a31cd1a4b41bf">discid_read()</a>.</p><p>
</p><dl compact="compact"><dt><b>Returns:</b></dt><dd>a DiscId object, or NULL. </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="66b979ebdc3069c773f1a436fe784cd5"></a><!-- doxytag: member="discid.h::discid_put" ref="66b979ebdc3069c773f1a436fe784cd5" args="(DiscId *d, int first, int last, int *offsets)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">int discid_put           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>d</em>, </td>
        </tr>
        <tr>
          <td class="md" align="right" nowrap="nowrap"></td>
          <td class="md"></td>
          <td class="md" nowrap="nowrap">int&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>first</em>, </td>
        </tr>
        <tr>
          <td class="md" align="right" nowrap="nowrap"></td>
          <td class="md"></td>
          <td class="md" nowrap="nowrap">int&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>last</em>, </td>
        </tr>
        <tr>
          <td class="md" align="right" nowrap="nowrap"></td>
          <td class="md"></td>
          <td class="md" nowrap="nowrap">int *&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>offsets</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Provides the TOC of a known CD. 
</p><p>
This function may be used if the TOC has been read earlier and you want 
to calculate the disc ID afterwards, without accessing the disc drive. 
It replaces the discid_read function in this case.</p><p>
On error, this function returns false and sets the error message which you can access using <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#ec0ff1282244491f914a81b9760ff49e">discid_get_error_msg()</a>. In this case, the other functions won't return meaningful values and should not be used.</p><p>
The offsets parameter points to an array which contains the track 
offsets for each track. The first element, offsets[0], is the leadout 
track. It must contain the total numbers of sectors on the disc.</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscID object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>first</em>&nbsp;</td><td>the number of the first audio track on disc (usually one) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>last</em>&nbsp;</td><td>the number of the last audio track on the disc </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offsets</em>&nbsp;</td><td>a pointer to an array of 100 track offsets </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>true if the given data was valid, and false on error </dd></dl>
    </td>
  </tr>
</tbody></table>
<a class="anchor" name="f8be042282a7bc69e29a31cd1a4b41bf"></a><!-- doxytag: member="discid.h::discid_read" ref="f8be042282a7bc69e29a31cd1a4b41bf" args="(DiscId *d, const char *device)" --></p><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tbody><tr>
    <td class="mdRow">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td class="md" nowrap="nowrap" valign="top">int discid_read           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap="nowrap" valign="top"><a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#18a0b8162c3f4f84e6d3bfd56dbd03cd">DiscId</a> *&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>d</em>, </td>
        </tr>
        <tr>
          <td class="md" align="right" nowrap="nowrap"></td>
          <td class="md"></td>
          <td class="md" nowrap="nowrap">const char *&nbsp;</td>
          <td class="mdname" nowrap="nowrap"> <em>device</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </tbody></table>
    </td>
  </tr>
</tbody></table>
<table border="0" cellpadding="0" cellspacing="5">
  <tbody><tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read the disc in the given CD-ROM/DVD-ROM drive. 
</p><p>
This function reads the disc in the drive specified by the given device 
identifier. If the device is NULL, the default drive, as returned by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#39808bea146a7d21db6d9a0df6890d6e">discid_get_default_device()</a> is used.</p><p>
On error, this function returns false and sets the error message which you can access using <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#ec0ff1282244491f914a81b9760ff49e">discid_get_error_msg()</a>. In this case, the other functions won't return meaningful values and should not be used.</p><p>
This function may be used multiple times with the same DiscId object.</p><p>
</p><dl compact="compact"><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellpadding="0" cellspacing="2">
    <tbody><tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td>a DiscId object created by <a class="el" href="http://users.musicbrainz.org/%7Eluks/docs/libdiscid/discid_8h.html#5e6d75fd6ffea8b36d599c6641d9ee02">discid_new()</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>device</em>&nbsp;</td><td>an operating system dependent device identifier, or NULL </td></tr>
  </tbody></table>
</dd></dl>
<dl compact="compact"><dt><b>Returns:</b></dt><dd>true if successful, or false on error. </dd></dl>
    </td>
  </tr>
</tbody></table>
</p><hr size="1"><address style=""><small>Generated on Sat Jul 22 18:31:35 2006 for libdiscid by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="discid_8h_files/doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
</body></html>